package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.A2SuspectedTargetMapper;
import com.ruoyi.a2.domain.A2SuspectedTarget;
import com.ruoyi.a2.service.IA2SuspectedTargetService;

/**
 * 疑似目标Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-14
 */
@Service
public class A2SuspectedTargetServiceImpl extends ServiceImpl<A2SuspectedTargetMapper, A2SuspectedTarget> implements IA2SuspectedTargetService
{
    @Autowired
    private A2SuspectedTargetMapper a2SuspectedTargetMapper;

    /**
     * 查询疑似目标
     *
     * @param id 疑似目标主键
     * @return 疑似目标
     */
    @Override
    public A2SuspectedTarget selectA2SuspectedTargetById(Long id)
    {
        return a2SuspectedTargetMapper.selectA2SuspectedTargetById(id);
    }

    /**
     * 查询疑似目标列表
     *
     * @param a2SuspectedTarget 疑似目标
     * @return 疑似目标
     */
    @Override
    public List<A2SuspectedTarget> selectA2SuspectedTargetList(A2SuspectedTarget a2SuspectedTarget)
    {
        return a2SuspectedTargetMapper.selectA2SuspectedTargetList(a2SuspectedTarget);
    }

    /**
     * 新增疑似目标
     *
     * @param a2SuspectedTarget 疑似目标
     * @return 结果
     */
    @Override
    public int insertA2SuspectedTarget(A2SuspectedTarget a2SuspectedTarget)
    {
        a2SuspectedTarget.setCreateTime(DateUtils.getNowDate());
        return a2SuspectedTargetMapper.insertA2SuspectedTarget(a2SuspectedTarget);
    }

    /**
     * 修改疑似目标
     *
     * @param a2SuspectedTarget 疑似目标
     * @return 结果
     */
    @Override
    public int updateA2SuspectedTarget(A2SuspectedTarget a2SuspectedTarget)
    {
        a2SuspectedTarget.setUpdateTime(DateUtils.getNowDate());
        return a2SuspectedTargetMapper.updateA2SuspectedTarget(a2SuspectedTarget);
    }

    /**
     * 批量删除疑似目标
     *
     * @param ids 需要删除的疑似目标主键
     * @return 结果
     */
    @Override
    public int deleteA2SuspectedTargetByIds(Long[] ids)
    {
        return a2SuspectedTargetMapper.deleteA2SuspectedTargetByIds(ids);
    }

    /**
     * 删除疑似目标信息
     *
     * @param id 疑似目标主键
     * @return 结果
     */
    @Override
    public int deleteA2SuspectedTargetById(Long id)
    {
        return a2SuspectedTargetMapper.deleteA2SuspectedTargetById(id);
    }
}
